<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'userManager.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css"
	href="/OA/system/css/userManager.css" />
<link rel="stylesheet" type="text/css" href="/OAProject/admin_cg/system/css/roleinfo.css">
	
</head>

<body>
	<div id="all">
		<div id="header">>>当前位置：角色管理</div>
		<form id="myform" action="/OAProject/bt/roleinfo_update" method="post">
			<s:hidden id="hidden" name="roleinfo.roleid"
				value="%{roleinfo.roleid}" />
			<p>
				角色名称：
				<s:textfield name="roleinfo.rolename" value="%{roleinfo.rolename}" />
			</p>
			<p>
				角色说明：
				<s:textarea name="roleinfo.roledesc" cols="30" rows="2"
					value="%{roleinfo.roledesc}"></s:textarea>
			</p>
			<p>
				<!-- &nbsp;&nbsp;&nbsp;&nbsp; <input id="addbtn" type="submit" value="添加"
					onclick="document.getElementById('myform').action='/OAProject/bt/roleinfo_save';" /> -->
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input id="savebtn" type="submit" value="保存修改" onclick="savebtn();" />
			</p>
		</form>
		<table id="all-table" border="1" cellspacing="0" cellpadding="5">
			<tr>
				<th>角色名称</th>
				<th>角色说明</th>
				<th>修改删除</th>
				<!-- <th>分配角色权限</th> -->
			</tr>
			<s:iterator value="%{#session.roleinfolist}">
				<tr>
					<td><s:property value="%{rolename}" /></td>
					<td><s:property value="%{roledesc}" /></td>
					<td><s:a
							href="/OAProject/bt/roleinfo_one?roleinfo.roleid=%{roleid}"
							onclick="savebtn">修改</s:a><%-- &nbsp;&nbsp; <s:a
							href="/OAProject/bt/roleinfo_delete?roleinfo.roleid=%{roleid}">删除</s:a> --%></td>
					<!-- <td><a
						href="/OAProject/bt/roleinfo_power?roleinfo.roleid=%{roleid}">分配权限</a></td> -->
				</tr>
			</s:iterator>
		</table>
	</div>
	<script type="text/javascript">
		/* var hidden = document.getElementById("hidden");
		var addbtn = document.getElementById("addbtn");
		var savebtn = document.getElementById("savebtn");
		if (hidden.value > 0) {
			addbtn.disabled = true;
			savebtn.disabled = false;
		}
		function savebtn() {
			document.getElementById("myform").action = "/OAProject/bt/roleinfo_update";
		} */
	</script>
</body>
</html>
